//读取键盘输入，遇到‘@’符号停止，翻转字母大小写
#include<iostream>
#include<cctype>

int main()
{
	char ch[5];
	std::cin.getline(ch, 5);
	int size = sizeof(ch) / sizeof(char);
	for (int i = 0; i < size; i++)
	{
		if (ch[i] != '\n' && ch[i] != '@')
		{
			if (isupper(ch[i]))
				ch[i] = tolower(ch[i]);
			else if (islower(ch[i]))
				ch[i] = toupper(ch[i]);
			std::cout << ch[i];
		}
		else
			break;
	}

	return 0;
}